function object(o){
    function F(){};
    F.prototype = o;
    return new F();
}
function createAnother(original){
    var clone = object(original)
    clone.sayHi = function(){
        console.log('hi')
    }
    return clone;
}

var person = {
    name:'moyu',
    friends:['yu','jiang']
}
var anotherPerson = createAnother(person)
anotherPerson.sayHi()
